 <projecta charset="utf-8">

<div class="box box-primary" id="app_cms_content_add" style="max-height: 720px;">
 
            <!-- form start -->
            <form role="form" id="cms_content_add_form">
              <div class="box-body">
                <div class="form-group">
                  <label for="title">标题</label>
                  <input type="text" name="title" v-model="content.title" class="form-control" id="title" placeholder=""  required aria-required="true" >
                </div>
			              
   				 <div class="form-group" style="height: 550px;" >
                  <label for="title">内容</label>
                  <script id="content_txr" type="text/plain" style="height:420px;" charset="utf-8" src="lang/zh-cn/zh-cn.js"></script> 
                </div>
                
               </div>
              <!-- /.box-body -->
              <div class="box-footer">
                 <button type="button" class="btn btn-default" v-on:click="cancel">取消</button>
                 <button type="button" class="btn btn-info pull-right"  v-on:click="doCreate">提交</button>
              </div>
            </form>
</div>


<script type="text/javascript">


var ue;
function doInitEU(){
	if(ue){
		ue.destroy();
	}
	ue = UE.getEditor('content_txr');
	UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
	UE.Editor.prototype.getActionUrl = function(action) {
	    if (action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
	       var url = API_DOMAIN + '/met/service/tenant/upload/uploadUeditorCMsImg';
	        return url;
	    } else if (action == 'uploadvideo') {
	        return '';
	    } else {
	        return this._bkGetActionUrl.call(this, action);
	    }
	}
}
//#1关于我们，2服务热线，3联系我们-公司邮箱，4联系我们-公司传真，5联系我们-公司地址，6联系我们-经纬度地址，7联系我们-咨询热线	8会议注册开通协议，
//9案例编辑，10问题指南--开通说明，11问题指南--常见问题，12资讯 #
new Vue({
        el: '#app_cms_content_add',
        data:  {
        	content:{
        		title: "",
        		content: "",
        		cmsType: null,
    		},
    	    bus:new Vue()
     }, 
     mounted: function(){
    	 var _this=this;
    	 _this.content.cmsType=zfesLayerEditDg.getLayerParam().cmsType;
    	 alert(_this.content.cmsType);
    	 doInitEU();
     },
     methods: {
        	 doCreate: function () {
        		 var _this=this;
        	    	if($("#cms_content_add_form").valid()){
        	    		var url="/met/service/admin/metCmsContent/createMetCmsContent";
        	    		var detail=ue.getContent();
        	    		_this.content.content=detail;
        	    		zfesAjax.ajaxTodo(url,_this.content, function(data){
        	    			alertSwal.successText(data.message);
        	    			layer.close(layer.index);
        	    		})
        	    	}
        	    },
        	  
        	    cancel: function(){
        	    	 layer.close(layer.index);
        	    	 
        	    }
    }
})

 </script>
